{extend name="common:frm_base" /}
{block name="content"}
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">旅行社详情</div>
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="{:url('bus/handle')}" lay-filter="component-form-group">
                <div class="layui-form-item">
                    <label class="layui-form-label">公司名称</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$info->company}" disabled autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">法人名字</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$info.person_name|default=''}" disabled autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">法人身份证编号</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$info.person_id_card|default=''}" disabled autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">身份证正面</label>
                    <div class="layui-input-block">
                        <div class="layui-upload-list" id="license_view">
                            <img class="layui-upload-img" src="{$info->person_id_card_front |default=''}">
                            <p id="test-upload-demoText"></p>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">身份证背面</label>
                    <div class="layui-input-block">
                        <div class="layui-upload-list" id="license_view">
                            <img class="layui-upload-img" src="{$info->person_id_card_back |default=''}">
                            <p id="test-upload-demoText"></p>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">营业执照编号</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$info.business_number|default=''}" disabled autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">营业执照图片</label>
                    <div class="layui-input-block">
                        <div class="layui-upload-list" id="license_view">
                            <img class="layui-upload-img" id="driving_license_img" src="{$info->business_licence |default=''}">
                            <p id="test-upload-demoText"></p>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">管理员名字</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$info.manage_name|default=''}" disabled autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">管理员手机</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$info.manage_mobile|default=''}" disabled autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">管理员身份证正面</label>
                    <div class="layui-input-block">
                        <div class="layui-upload-list" id="license_view">
                            <img class="layui-upload-img" src="{$info->manage_id_card_front |default=''}">
                            <p id="test-upload-demoText"></p>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">管理员身份证背面</label>
                    <div class="layui-input-block">
                        <div class="layui-upload-list" id="license_view">
                            <img class="layui-upload-img" src="{$info->manage_id_card_back |default=''}">
                            <p id="test-upload-demoText"></p>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-inline">
                        <input type="radio" name="status" checked value="{$info->getData('status')}" title="{$info->status}">
                    </div>
                </div>
                {:token()}
                <input type="hidden" value="{$act}" name="act" />
                <input type="hidden" value="{$info['id']|default=''}" name="id" />
                <div class="layui-form-item layui-hide">
                    <input type="button" lay-submit lay-filter="LAY-user-front-submit" id="LAY-user-front-submit" value="确认">
                </div>
                <!--<div class="layui-form-item layui-layout-admin">-->
                <!--<div class="layui-input-block">-->
                <!--<div class="layui-footer" style="left: 0;">-->
                <!--<button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">立即提交</button>-->
                <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                <!--</div>-->
                <!--</div>-->
                <!--</div>-->
            </form>
        </div>
    </div>
</div>


<script>
    layui.config({
        base: '__LAYUIADMIN__/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate', 'upload'], function(){
        var $ = layui.$
            ,admin = layui.admin
            ,element = layui.element
            ,layer = layui.layer
            ,laydate = layui.laydate
            ,form = layui.form
            ,upload = layui.upload;

        form.render(null, 'component-form-group');

        laydate.render({
            elem: '#begin_time'
            ,type: 'date'
        });

        $('#pic-list').viewer();
        $("#license_view").viewer();

        $(".demo-reload").click(function () {
            $(this).parents('.layui-col-xs3').remove();//模拟前端删除按钮
            var img_urls = [];
            $(".layui-upload-img").each(function () {
                img_urls.push($(this).attr("data-src"));
            });
            $("#img_url").val(img_urls);
        });

        form.render(null, 'component-form-group');

    });

    function openImg(i) {
        layer.photos({
            photos: '#pic-list'
        });
    }
</script>
{/block}